﻿@model BBICMS.WebUI.Models.RegisterModel
@{
    ViewBag.Title = "注册";
    Layout = "~/Views/Shared/_LayoutSign.cshtml";
}

@section header{
    <!-- this page specific styles -->
    <link rel="stylesheet" href="@Url.Content("~/Content/Admin/css/compiled/signup.css")" type="text/css" media="screen" />
}

<div class="header">
    <a href="index.html">
        <img src="@Url.Content("~/Content/Admin/img/logo.png")" class="logo" alt="logo" />
    </a>
</div>
<div class="login-wrapper">
    <div class="box">
        <div class="content-wrap">
            <h6>新建帐户</h6>
            @using (Html.BeginForm())
{
                @Html.AntiForgeryToken()
                
                
                <div class='@(Html.ViewData.ModelState.IsValid ? "hide panel" : "panel") panel-danger' data-valmsg-summary="true">
                    <div class="panel-heading text-left"><i class="icon-remove"></i> 登录失败</div>
                    <div class="panel-body">
                        @Html.ValidationSummary(false)
                    </div>
                </div>                
                

                @Html.TextBoxFor(m => m.UserName, new { @class = "form-control", placeholder = "用户名" })
                @Html.PasswordFor(m => m.Password, new { @class = "form-control", placeholder = "密码" })
                @Html.PasswordFor(m => m.ConfirmPassword,new { @class = "form-control", placeholder = "确认新密码" })
             
                
                <div class="action">
                    <input type="submit" value="注册" class="btn-glow primary signup" />                  
                </div>

}
            </div>
        </div>
                <div class="already">
                    <p>已经有一个帐号？</p>                
                    @Html.ActionLink("登录", "Register")
                </div>
            </div>





            @section footer {                

                 <!-- pre load bg imgs -->
                <script type="text/javascript">
                    $(function () {
                        // bg switcher

                        function onErrors(event, validator) {
                            // 'this' is the form element
                            var container = $(this).find("[data-valmsg-summary=true]"), list = container.find("ul");
                            if (list && list.length && validator.errorList.length) {
                                list.empty();
                                container.addClass("validation-summary-errors").removeClass("validation-summary-valid");
                                $.each(validator.errorList, function () {
                                    $("<li />").html(this.message).appendTo(list);
                                });
                            }
                        }



                    });
                </script>


            }
